
;1、请写一个程序统计AX寄存器中置1位的个数。


assume cs:code,ds:data

data segment 

number dw 7354h
data ends



code segment

start:
		mov ax, data
		mov ds, ax
		mov cl, 20h
		mov ax, [number]
		xor bx, bx
		

calc:
		shr ax, 1
		jnc count
		add bx, 1
		loop calc
			
		jmp exit
		
count :
		sub cl, 1
		jmp calc

exit:
		mov ax, 4c00h
		int 21h

code ends
		end start